package com.example.android.test.project2;

import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class DisplayTabActivity extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display_tab);
        
        //Initializing Tabs
        TabHost th = (TabHost)findViewById(android.R.id.tabhost);
        TabSpec ts1 = th.newTabSpec("tab_id_1");
        TabSpec ts2 = th.newTabSpec("tab_id_2");
        TabSpec ts3 = th.newTabSpec("tab_id_3");
        TabSpec ts4 = th.newTabSpec("tab_id_4");
        TabSpec ts5 = th.newTabSpec("tab_id_5");
        ts1.setIndicator("Policy Info").setContent(new Intent(this,Tab1Activity.class));
        ts2.setIndicator("Coverages").setContent(new Intent(this,DisplayHomePageActivity.class));
        ts3.setIndicator("Drivers").setContent(new Intent(this,ResultsPageActivity.class));
        ts4.setIndicator("Billing").setContent(new Intent(this,Tab2Activity.class));
        ts5.setIndicator("Claims").setContent(new Intent(this,Tab1Activity.class));
        
        th.addTab(ts1);
        th.addTab(ts2);     
        th.addTab(ts3);     
        th.addTab(ts4);  
        th.addTab(ts5);  
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_display_tab, menu);
        return true;
    }
}
